package com.x.Part6_thisDemo;

/**
 * ClassName: BankTest
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2023/10/13 3:53
 */
public class BankTest {
    public static void main(String[] args) {
        Bank bank = new Bank();
        bank.addCustomer("张","雪峰");
        bank.addCustomer("刘","备");
        bank.addCustomer("韩","立");

        bank.getCustomer(1).setAccount(new Account(500));
        bank.getCustomer(1).getAccount().withdraw(50);

        bank.getCustomer(0).setAccount(new Account(800));
        bank.getCustomer(0).getAccount().deposit(50);

        System.out.println("账户余额:"+bank.getCustomer(1).getAccount().getBalance());
        System.out.println("账户余额:"+bank.getCustomer(0).getAccount().getBalance());

    }
}
